#ifndef OBJ01_H
	#define OBJ01_H

	#include	"common.h"

	#ifdef __cplusplus
	extern "C"{
	#endif



int CalcSine();
int CalcAngle();
FUNCINLINE int Obj01();
FUNCINLINE int Sonic_Display();
int Sonic_RecordPos();
FUNCINLINE int Sonic_Water();
int Obj01_MdNormal_Checks();
FUNCINLINE int Obj01_MdAir();
FUNCINLINE int Obj01_MdRoll();
FUNCINLINE int Obj01_MdJump();
FUNCINLINE int Sonic_Move();
int Obj01_CheckWallsOnGround();
FUNCINLINE int Sonic_MoveLeft();
FUNCINLINE int Sonic_MoveRight();
FUNCINLINE int Sonic_RollSpeed();
FUNCINLINE int Sonic_RollLeft();
FUNCINLINE int Sonic_RollRight();
int Sonic_ChgJumpDir();
int Sonic_LevelBound();
FUNCINLINE int Sonic_Roll();
int Sonic_Jump();
int Sonic_JumpHeight();
FUNCINLINE int Sonic_Super();
FUNCINLINE int Sonic_CheckSpindash();
FUNCINLINE int Sonic_SlopeResist();
FUNCINLINE int Sonic_RollRepel();
int Sonic_SlopeRepel();
int Sonic_JumpAngle();
int Sonic_DoLevelCollision();
int Sonic_ResetOnFloor(char label);
FUNCINLINE int Obj01_Hurt();
FUNCINLINE int Sonic_HurtStop();
FUNCINLINE int Sonic_HurtInstantRecover();
FUNCINLINE int Obj01_Dead();
FUNCINLINE int CheckGameOver();
FUNCINLINE int Obj01_Gone();
FUNCINLINE int Obj01_Respawning();
int Sonic_Animate();
int AnglePos();
int Sonic_Angle();
int Floor_ChkTile();
int FindFloor();
int FindFloor2();
int Obj_CheckInFloor();
int FindWall();
int FindWall2();
FUNCINLINE int CalcRoomInFront();
FUNCINLINE int CalcRoomOverHead();
int Sonic_CheckFloor();
FUNCINLINE int ChkFloorEdge();
int ChkFloorEdge_Part2();
FUNCINLINE int CheckRightCeilingDist();
int CheckRightWallDist();
int CheckRightWallDist_Part2();
int CheckCeilingDist();
FUNCINLINE int CheckSlopeDist();
FUNCINLINE int CheckLeftCeilingDist();
int CheckLeftWallDist();
int CheckLeftWallDist_Part2();
int LoadSonicDynPLC();
int KillCharacter();
int DisplaySprite();
int ObjectMoveAndFall();
int ObjectMove();
FUNCINLINE int TouchResponse();
FUNCINLINE void PositionCamera(short x, short y);

// additional temporary storage
int i;
int n;
int stack[16];

// quick and dirty fix to force a function return to exit the object
char double_return;

// quick and dirty fix for external object variables
char	a1_status;/////////////////////!!! (a1)
char	a1_width_pixels;///////////////!!! (a1)
short	a1_x_pos;//////////////////////!!! (a1)

char	Update_HUD_lives_2P;
char	Update_HUD_rings_2P;
char	Update_HUD_timer_2P;
char	Update_HUD_score_2P;
char	Two_player_mode;

short	Water_Level_1;
char	Palette_frame_count;
char	Super_Sonic_palette;
short	Super_Sonic_frame_count;

char	Water_flag;
char	Extra_life_flags_2P;

char	Control_Locked;
short	Chain_Bonus_counter;
char	Current_Boss_ID;

short	Level_Inactive_flag;
short	Timer_frames;
short	Debug_object;
short	Debug_placement_mode;
short	Debug_mode_flag;
char	Emerald_count;
char	Continue_count;
char	Super_Sonic_flag;
char	Time_Over_flag;

char	Update_HUD_lives;
char	Update_HUD_rings;
char	Update_HUD_timer;
char	Update_HUD_score;

char	Update_Bonus_score;
short	Chain_Bonus_counter;
short	Perfect_rings_left;

char	Time_Over_flag;
char	Time_Over_flag_2P;

char	Last_star_pole_hit;
char	Last_star_pole_hit_2P;

int		Timer;
short	Timer_minute_word;
char	Timer_minute;
char	Timer_second;
char	Timer_millisecond;


	#ifdef __cplusplus
	}
	#endif
#endif
